package com.heihei.itextdemo.controller;


import com.heihei.itextdemo.dto.CommonResponseDTO;
import com.heihei.itextdemo.entity.HumanEntity;
import com.heihei.itextdemo.service.HumanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 人物 前端控制器
 * </p>
 *
 * @author duanhengfei
 * @since 2020-12-04
 */
@RestController
@RequestMapping("/human")
@Api(value = "人物", tags = "人物")
public class HumanController {

    @Resource
    private HumanService humanService;

    /**
     * 添加
     */
    @PostMapping("/save")
    @ApiOperation(value = "添加", notes = "添加")
    public CommonResponseDTO<String> add(@RequestBody HumanEntity entity) {
        return humanService.add(entity);
    }
}
